#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct stu
{
    int id,len;
    char fname[20],lname[20];
    char sex;
    double x,y,z,sum,avg;
}s;
int main()
{
    FILE* pf;
    pf=fopen("C:\\Users\\Lvshuhang\\Desktop\\home work\\5866\\student.txt","r");
    if(pf==NULL)
    {
        perror("fopen");
        return 1;
    }
    while(!feof(pf))
    {
        fscanf(pf,"%d%d%s%s %c%.2lf%.2lf%.2lf%.2lf%.2lf\n",&s.id,&s.len,s.fname,s.lname,&s.sex,&s.x,&s.y,&s.z,&s.avg,&s.sum);
        printf("%d %d %s  %s %c %.2lf %.2lf %.2lf %.2lf %.2lf\n",s.id,s.len,s.fname,s.lname,s.sex,s.x,s.y,s.z,s.avg,s.sum);
    }
    fclose(pf);
    pf=NULL;
    return 0;
}
